<template>
	<div class="header_login">
		<router-link :to="{name:'download-app', params:{title:msg, id:0, datetime:datetime}}"><i class="icon-app_news"></i></router-link>
		<router-link :to="{name:'search', params:{key:searchKey}}"><i class="icon-search_news"></i></router-link>
		<router-link :to='{name:"user", params:{id:user.userid}}' v-if="login"><i class="icon-signin"></i></router-link>
		<router-link :to="{name:'signin'}" v-else><i class="icon-signin"></i></router-link>
	</div>
</template>

<script>
	export default {
		name: "HeaderLogin",
		props:["login","user", "searchKey"],
		data: function(){
			console.log(this.login)
			return {
				msg:encodeURIComponent('精彩新闻等着你...'),
				datetime: dateFormat(new Date().getTime())
			}
		},
		methods:{
			headerMenuRouter(e, args){
				this.$router.push(args);
			}
		}
	}
</script>

<style lang="less">
	@base:23.44/1rem;
	.header_login{
		display:block;
		text-align: right;
		padding:20/@base 20/@base 0 0;
		a{
			color:#fff;
			font-size: 35/@base;
			line-height: 35/@base;
			display:inline-block;
			margin:0 20/@base 0 0;
			&:last-child{
				margin:0;
			}
			i{
				display: block;
			}
		}
	}
</style>
